package cn.csdj.sism.service.impl;

import cn.csdj.sism.dao.CGradeMapper;
import cn.csdj.sism.pojo.CGrade;
import cn.csdj.sism.service.CGradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Service实现类
 * 夏锦红
 * 2023/4/7
 */
@Service
public class CGradeServiceImpl implements CGradeService {
    @Autowired
    private CGradeMapper cGradeMapper;
    @Override
    public int insert(CGrade cGrade) {
        return cGradeMapper.insert(cGrade);
    }

    @Override
    public int deleteById(Integer id) {
        return cGradeMapper.deleteById(id);
    }

    @Override
    public int update(CGrade cGrade) {
        return cGradeMapper.updateById(cGrade);
    }

    @Override
    public CGrade selectById(Integer id) {
        return cGradeMapper.selectById(id);
    }

    @Override
    public List<CGrade> selectAll() {
        return cGradeMapper.selectList(null);
    }
}
